﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace ZombieMapEditor
{
    public class Player : MapObject
    {
        public void Draw(Graphics g)
        {
            g.FillEllipse(Selected ? Brushes.DarkRed : Brushes.Red, Position.X - 10f, Position.Y - 10f, 20f, 20f);
        }

        public bool PointCollision(PointF p)
        {
            PointF p2 = PointF.Subtract(p, new SizeF(Position));
            return Math.Sqrt(p2.X * p2.X + p2.Y * p2.Y) < 11f;
        }
    }
}
